﻿using Admin2024.Application.Contracts.Permission.Dto;
using Admin2024.Application.Permission.Dto;
using Admin2024.Domain.Entity.System;
using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Admin2024.Application.Contracts.Helper
{
    public  class PermissionAutoMapperProfile:Profile
    {
       public PermissionAutoMapperProfile() {

            CreateMap<PermissionCreateDto, AppPermission>();
            CreateMap<AppPermission,PermissionCreateSucessDto>();



            CreateMap<OperationCreateDto, AppOperation>();
            CreateMap<AppOperation, OperationCreateSucessDto>();

            CreateMap<ResourceCreateDto,AppResource>();
            CreateMap<AppResource, ResourceCreateSucessDto>();

            CreateMap<AppPermission,PermissionDto>();
            CreateMap<AppOperation,OperationDto>(); 
            CreateMap<AppResource,ResourceDto>();

            CreateMap<ResourceDto, ResourceDto>();
            CreateMap<AppOperation, OperationDto>();

            CreateMap<ResourceUpdateDto,AppResource>();
            CreateMap<OperationUpdateDto,AppOperation>();
        } 
    }
}
